from django.contrib import admin
from .models import User

# Register your models here.
admin.AdminSite.site_header = '疫情舆论分析后台管理系统'


class UsersAdmin(admin.ModelAdmin):
    empty_value_display = 'null'

    # 配置显示哪些字段
    list_display = ['username', 'mobile', 'email']
    # 搜索某个字段
    search_fields = ['username']

    # readonly_fields = ['password']
    # 分页
    list_per_page = 10


admin.site.register(User, UsersAdmin)
